package hqu.cst.xah.controller;


import hqu.cst.xah.pojo.Order;
import hqu.cst.xah.service.OrderService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/order")
@Tag(name = "订单管理", description = "订单管理相关接口")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping("/createOrder")
    public void createOrder(@RequestBody Order order){
        orderService.createOrder(order);
    }

    @PutMapping("/updateOrder")
    public void updateOrder(@RequestBody Order order) {
        orderService.updateOrder(order);
    }
}
